import Request from "@/common/utils/request";

enum Api {
  GetMenus = "/jeecgboot/pos/menus/list",
  AddMenu = "/jeecgboot/pos/menus/add",
  EditMenu = "/jeecgboot/pos/menus/edit",
}

export const getMenus = (params: any) =>
  Request.getInstance().send<any[]>({
    url: Api.GetMenus,
    method: "GET",
    params
  });

export const addMenu = (data: any) =>
  Request.getInstance().send({
    url: Api.AddMenu,
    method: "POST",
    data,
  });

export const editMenu = (data: any) =>
  Request.getInstance().send({
    url: Api.EditMenu,
    method: "POST",
    data,
  });
